package com.atguigu.mq.listener;

import com.rabbitmq.client.Channel;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;
//像监听就得进容器
//@Component
public class MyMessageListener4 {
    //在路由模式下

    //指定监听的队列
    @RabbitListener(queues = {"atguigu.queue.direct"})
    public void processMessage01(String messageContent, Message message, Channel channel) {
        System.out.println("Consumer01 Message Content:" + messageContent);
    }

}
